export const startSession = (token, id) => {
    localStorage.setItem("accessToken", token);
    localStorage.setItem("id", id);
}

export const getSession = () => {
    return {
        accessToken: localStorage.getItem("accessToken"),
        portfolioId: localStorage.getItem("id")
    }
}

export const endSession = () => {
    localStorage.clear();
}

export const isLoggedIn = () => {
    return getSession().accessToken;
}